package com.tencent.sr.iris.activity.interfaces.client.activity;

import com.tencent.sr.iris.activity.interfaces.request.IrisPaginationRequest;
import com.tencent.sr.iris.activity.interfaces.request.acticity.*;
import com.tencent.sr.iris.activity.interfaces.response.activity.ActivityAwardInfoResponse;
import com.tencent.sr.iris.activity.interfaces.response.activity.ActivityMonthLimitResponse;
import com.tencent.sr.iris.activity.interfaces.response.activity.ActivityUidLimitResponse;
import com.tencent.sr.rmall.common.primitive.HttpResult;
import com.tencent.sr.rmall.common.request.PaginationRequest;
import com.tencent.sr.rmall.common.response.PaginationResponse;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = "iris-activity-core-service", contextId = "ActivityConfigClient",
        path = "/api/v1/iris/iris-activity-core-service/activity/config")
public interface ActivityConfigClient {

    @PostMapping("monthLimitConfigPage")
    @ApiOperation(value = "查询月份限额列表", httpMethod = "POST")
    HttpResult<PaginationResponse<ActivityMonthLimitResponse>> monthLimitConfigPage(
            @Validated @RequestBody PaginationRequest request);

    @PostMapping("uidLimitConfigPage")
    @ApiOperation(value = "查询uid限额列表", httpMethod = "POST")
    HttpResult<PaginationResponse<ActivityUidLimitResponse>> uidLimitConfigPage(
            @Validated @RequestBody IrisPaginationRequest<ActivityUidLimitPageRequest> request);

    @PostMapping("addCurrentMonthLimit")
    @ApiOperation(value = "新增当月配置", httpMethod = "POST")
    HttpResult<Boolean> addCurrentMonthLimit(
            @Validated @RequestBody ActivityMonthLimitAddRequest request);

    @PostMapping("addUidLimit")
    @ApiOperation(value = "新增uid配置", httpMethod = "POST")
    HttpResult<Boolean> addUidLimit(
            @Validated @RequestBody ActivityUidLimitAddRequest request);

    @PostMapping("updateUidLimit")
    @ApiOperation(value = "更新uid配置", httpMethod = "POST")
    HttpResult<Boolean> updateUidLimit(
            @Validated @RequestBody ActivityUidLimitUpdateRequest request);

    @PostMapping("getConfigAwardInfo")
    @ApiOperation(value = "查询活动奖励配置金额", httpMethod = "POST")
    HttpResult<ActivityAwardInfoResponse> getConfigAwardInfo(@RequestBody GetActivityConfigAwardRequest request);
}
